﻿<%@ Page Language="C#" MasterPageFile="~/Main/AdminPage.master" AutoEventWireup="true" CodeFile="ShopData.aspx.cs" Inherits="Main_ShopData" Title="店面列表" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <table>
        <tr>
            <td>
               状态：</td>
            <td>
                <asp:DropDownList ID="ddlstate" runat="server" 
                onselectedindexchanged="ddlstate_SelectedIndexChanged" 
                AppendDataBoundItems="True" AutoPostBack="True">
                    <asp:ListItem Value="2">--请选择--</asp:ListItem>
                <asp:ListItem Value="0">审核通过</asp:ListItem>
                <asp:ListItem Value="1">未审核</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                店名：</td>
            <td>
                 <asp:TextBox ID="txtname" runat="server"></asp:TextBox></td>
            <td>
                 <asp:Button ID="btnsearch" runat="server" Text="查找" onclick="btnsearch_Click" /></td>
        </tr>
    </table>
        <asp:GridView ID="gvshop" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" 
            BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="Sid" 
            OnPageIndexChanging="gvshop_PageIndexChanging" OnRowCommand="gvshop_RowCommand" 
            PageSize="20" Width="680px" onrowdatabound="gvshop_RowDataBound">
            <Columns>
                <asp:TemplateField HeaderText="店名">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlname" runat="server" Target="_blank" 
                            Text='<%# Eval("Sname") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Fname" HeaderText="领域" />
                <asp:BoundField DataField="Tname" HeaderText="类型" />
                <asp:BoundField DataField="Saddress" HeaderText="地址" />
                <asp:BoundField DataField="Stel" HeaderText="电话" />
                <asp:BoundField DataField="Shot" HeaderText="热度"/>
                <asp:BoundField DataField="Sup" HeaderText="支持数"/>
                <asp:TemplateField HeaderText="修改">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlupdate" runat="server">修改</asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="图片">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlpic" runat="server">图片</asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="审核">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbupdate" runat="server" 
                            CommandArgument='<%# Eval("Sid") %>' CommandName="upd">通过</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="删除">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbdelete" runat="server" 
                            CommandArgument='<%# Eval("Sid") %>' CommandName="del">删除</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle CssClass="FooterStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
            <PagerStyle CssClass="PagerStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
            <SelectedRowStyle CssClass="SelectedRowStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
            <HeaderStyle CssClass="HeaderStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
            <EditRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            <AlternatingRowStyle CssClass="AlternatingRowStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
        </asp:GridView>
</asp:Content>

